<%@ page contentType="text/html; charset=utf-8" language="java" pageEncoding="utf-8"%>
<%@ page contentType="text/html; charset=utf-8" language="java" %>
<%@ page import="java.util.Set,java.util.Iterator" %>
<%@ page import="com.sanqing.po.Employee,com.sanqing.po.Training" %>
<%@ page import="com.sanqing.tool.DateUtil" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>人力资源管理系统</title>
<link rel="stylesheet" rev="stylesheet" href="../css/style.css " type="text/css" media="all" />
<style type="text/css">
<!--
.atten {font-size:12px;font-weight:normal;color:#F00;}
-->
</style>
</head>
<body class="ContentBody">
<div class="MainDiv">
<table width="99%" border="0" cellpadding="0" cellspacing="0" class="CContent">
  <tr>
      <th class="tablestyle_title" >
      <%
		String status=null;
		try{
			status=request.getParameter("status").toString();
		}catch(Exception e){
			status="0";
		}
		if("1".equals(status)){
			out.print("培训详细总结");
		  }else{
			out.print("培训详细计划");
		  }
		%>
      </th>
  </tr>
     <%
     Training t = (Training)request.getAttribute("training");
	 if(t!=null){
     %>
		<TR>
			<TD width="100%">
				<fieldset style="height:100%;">
					  <table border="0" cellpadding="8" cellspacing="1" style="width:100%">
					  <tr>
					    <td nowrap align="right" width="11%">培训名称：</td>
					    <td colspan="3"><%=t.getName() %></td>
					    </tr>
					  <tr>
					    <td nowrap align="right" width="11%">培训目的：</td>
					    <td colspan="3"><%=t.getPurpose() %></td>
					    </tr>
					  <tr>
					    <td nowrap align="right">培训开始时间：</td>
					    <td width="29%"><%=t.getBegintime() %></td>
					    <td width="18%">培训持续时间：</td>
					    <td width="42%"><%=t.getDays() %></td>
					  </tr>
					  <tr>
					    <td nowrap align="right">讲师：</td>
					    <td><%=t.getTeacher() %></td>
					    <td nowrap>培训类型：</td>
					    <td><%=t.getType() %></td>
					  </tr>
					    
					  <tr>
					    <td width="11%" nowrap align="right">培训材料：</td>
					    <td colspan="3"><%=t.getDatum() %></td>
					  </tr>
			          <%if("1".equals(status)){%>
						  <tr>
						    <td width="11%" height="22" align="right" >培训效果：</td>
						    <td height="22" colspan="3" align="left" ><%=t.getEffect()%>&nbsp;</td>
						  </tr>
						  <tr>
						    <td width="11%" height="22" align="right" >培训总结：</td>
						    <td height="22" colspan="3" align="left" ><%=t.getSummarize()%>&nbsp;</td>
						  </tr>
					   <%} %>
					  </table>
				</fieldset>			
				</TD>
		</TR>
		<TR>
			<TD width="100%">
				<fieldset style="height:100%;">
					  <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#464646" class="newfont03">
					  <tr class="CTitle" >
                    	<td height="22" colspan="8" align="center" style="font-size:16px">培训人员列表</td>
                       </tr>
	 <tr bgcolor="#EEEEEE">
		<td width="10%" align="center" height="30">编号</td>
		<td width="10%" align="center" >姓名</td>
		<td width="10%" align="center" >性别</td>
		<td width="10%" align="center" >出生日期</td>
		<td width="10%" align="center" >联系电话</td>
		<td width="10%" align="center" >邮箱</td>
		<td width="10%" align="center" >创建日期</td>
		<td width="10%" align="center" >所属部门</td>
	 </tr>
	 <% 
	 Set employees = (Set)t.getEmployees();
	 if(employees!=null&&employees.size()>0){
	 Iterator it = employees.iterator();
	 while(it.hasNext()){
	   Employee e = (Employee)it.next();
	 %>
	<tr bgcolor="#FFFFFF">
		<td height="22" align="center" ><%=e.getId() %>&nbsp;</td>
		<td height="22" align="center" ><%=e.getName() %>&nbsp;</td>
		<td height="22" align="center" ><%=e.getSex()?"男":"女"%>&nbsp;</td>
		<td height="22" align="center" ><%=DateUtil.parseToString(e.getBirthday(),DateUtil.yyyyMMdd)%>&nbsp;</td>
		<td height="22" align="center" ><%=e.getPhone() %>&nbsp;</td>
		<td height="22" align="center" ><%=e.getEmail() %>&nbsp;</td>
		<td height="22" align="center" ><%=DateUtil.parseToString(e.getCreatetime(),DateUtil.yyyyMMdd)%>&nbsp;</td>
		<td height="22" align="center" ><%=e.getDepartment()!=null?e.getDepartment().getName():"" %></td>
	</tr>
	<%}}else{ %>
    <tr  bgcolor="#FFFFFF">  
		<td height="22" colspan="8" align="center" >暂时没有添加任何人员！！！</td>
	</tr>
	<%} %>
    </table><br/>
				</fieldset>			
				</TD>
		</TR>
	<%}else{ %>
  	<tr>
    <td height="22" colspan="4" align="center" >该信息不存在！！！</td>
  	</tr>
  	<%} %>
</TABLE>	
</div>
</body>
</html>

